/** When your routing table is too long, you can split it into small modules **/

import Layout from "@/layout";
import AppMain from "@/layout/components/AppMain.vue";
import componentsRouter from "./components";
import chartsRouter from "./charts";
const systemManagement = {
  path: "/systemManagement",
  component: Layout,
  redirect: "/systemManagement/icon",
  name: "SystemManagement",
  meta: {
    title: "系统管理",
    icon: "table",
  },
  children: [
    {
      path: "/component",
      component: AppMain,
      name: "component",
      meta: { title: "组件管理", icon: "icon", noCache: true },
      children: [
        {
          path: "/icon",
          component: () => import("@/views/xitong/icons/index"),
          name: "Icons",
          meta: { title: "图标", icon: "icon", noCache: true },
        },

        componentsRouter,

        chartsRouter,

        {
          path: "/editCentent",
          component: () => import("@/views/xitong/example/create"),
          name: "CreateArticle",
          meta: { title: "编辑内容", icon: "edit" },
        },

        {
          path: "edit/:id(\\d+)",
          component: () => import("@/views/xitong/example/edit"),
          name: "EditArticle",
          meta: {
            title: "Edit Article",
            noCache: true,
            activeMenu: "/example/list",
          },
          hidden: true,
        },

        {
          path: "list",
          component: () => import("@/views/xitong/example/list"),
          name: "ArticleList",
          meta: { title: "列表展示", icon: "list" },
        },

        {
          path: "error",
          name: "errorPage",
          meta: { title: "异常界面", noCache: false, icon: "bug" },
          component: AppMain,
          children: [
            {
              path: "401",
              component: () => import("@/views/xitong/error-page/401"),
              name: "Page401",
              meta: { title: "401", noCache: true },
            },
            {
              path: "404",
              component: () => import("@/views/xitong/error-page/404"),
              name: "Page404",
              meta: { title: "404", noCache: true },
            },
          ],
        },

        {
          path: "pdfLook",
          component: () => import("@/views/xitong/pdf/index"),
          name: "PDF",
          meta: { title: "PDF浏览", icon: "pdf" },
        },

        {
          path: "/pdf/download",
          component: () => import("@/views/xitong/pdf/download"),
          hidden: true,
        },

        {
          path: "theme",
          component: () => import("@/views/xitong/theme/index"),
          name: "Theme",
          meta: { title: "主题", icon: "theme" },
        },
      ],
    },

    // 权限管理
    {
      path: "authorityManagement",
      component: AppMain,
      name: "Theme",
      meta: { title: "权限管理", icon: "tab" },
      children: [
        {
          path: "roleManagement",
          component: () => import("@/views/systemMangement/roleManagement"),
          name: "RoleManagement",
          meta: { title: "角色管理", icon: "tab" },
        },

        {
          path: "menuManagement",
          component: () => import("@/views/systemMangement/menuManagement"),
          name: "MenuManagement",
          meta: { title: "菜单管理", icon: "tab" },
        }
      ]
    },

    {
      path: "dataBase",
      component: () => import("@/views/systemMangement/dataBase"),
      name: "Theme",
      meta: { title: "数据字典", icon: "tab" },
    },

    {
      path: "interfaceWhitelist",
      component: () => import("@/views/systemMangement/interfaceWhitelist"),
      name: "Theme",
      meta: { title: "接口白名单", icon: "tab" },
    },

    {
      path: "fileSystem",
      component: () => import("@/views/systemMangement/fileSystem"),
      name: "Theme",
      meta: { title: "系统文件", icon: "tab" },
    },

  ],
};
export default systemManagement;
